package game.ability;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;

import game.entity.AbsSprite;
import game.entity.SpriteManager;
import game.shared.Constants;

public class AbsAbility implements IAbility{

	protected int id;
	protected SpriteManager targetSprites;
	protected boolean complete;
	float slower;
	public void setSlower(float slower) {
		this.slower = slower;
	}

	public AbsAbility() {
//		this.id = ++Constants.ID_SPRITE;
		this.targetSprites = new SpriteManager();
		this.complete = false;
	}
	public AbsAbility(int id) {
		this.id = id;
		this.targetSprites = new SpriteManager();
		this.complete = false;
	}

	public int getId() {
		return id;
	}

	@Override
	public void action() {
	}	
	
	public void setTarget(AbsSprite _targetSprite)
	{
		this.targetSprites.removeAll();
		this.targetSprites.add(_targetSprite);
	}
	
	public void setTarget(SpriteManager _targetSprites)
	{
		this.targetSprites.removeAll();
		//for(int i=0; i<_targetSprites.count(); i++)
		//	this.targetSprites.add(_targetSprites.getByIndex(i));
		this.targetSprites = _targetSprites;
	}
	
	public void addTarget(AbsSprite _targetSprite)
	{
		targetSprites.add(_targetSprite);
	}
	
	public void removeTarget(int spriteId)
	{
		targetSprites.removeById(spriteId);
	}

	public void render(SpriteBatch sb) {
		//sb.draw(Resources.getTextureRegion(1), 210, 150);
	}

	@Override
	public void renderShape() {
	}

	public void update() {
	}
}
